<{include file="admin:common/header.html"}>
<div class="page-title">
    <table width="100%" align="center" cellpadding="0" cellspacing="0" >
      <tr>
        <td width="30" align="right"><img src="<{$pager.url}>/images/main-h5-ico.gif" alt="" /></td>
        <th><{$MOD.title}></th>
        <td align="right"><{link ctl="designer/comment:index" priv="hidden" class="button"}></td>
        <td width="15"></td>
      </tr>
    </table>
</div>
<div class="page-data">
<form action="?designer/comment-edit.html" mini-form="comment-form" method="post" >
<input type="hidden" name="comment_id" value="<{$detail.comment_id}>"/>
<table width="100%" border="0" cellspacing="0" class="table-data form">
<tr><th>业主：</th><td><{$member.uname|default:'游客'}></td></tr>
<tr><th>设计师：</th><td><{$designer.name|default:$designer.uname}></td></tr>
<tr><th>评分：</th>
    <td>
        <{foreach $CONFIG.score.designer as $k=>$v}>
        <label><{$v}>:<input type="text" name="data[<{$k}>]" value="<{$detail[$k]|default:'0'}>" class="input w-100"/>&nbsp;&nbsp;</label>
        <{/foreach}>
    </td>
</tr>
<tr><th>评论：</th><td><textarea name="data[content]" class="textarea"><{$detail.content}></textarea><br /></td></tr>
<tr>
	<th>审核：</th>
	<td>
		<label><input type="radio" name="data[audit]" <{if $detail.audit}>checked="checked"<{/if}> value="1"/>发布</label>&nbsp;&nbsp;
		<label><input type="radio" name="data[audit]" <{if empty($detail.audit)}>checked="checked"<{/if}> value="0"/>待审</label>
	</td>
</tr>
    <tr><th class="clear-th-bottom"></th><td class="clear-td-bottom" colspan="10"><input type="submit" class="bt-big" value="提交数据" /></td></tr>
</table>
</form></div>
<script type="text/javascript">
(function(K, $){
$("select[name='data[city_id]']").live('change', function(){
	var city_id = $(this).val();
	if(!city_id){return false;}
	$.getJSON("?data/area-city-"+city_id+".html", function(ret){
		if(ret.error){
			Widget.MsgBox.error(ret.message.join(","));
		}else if(ret.areas.length>0){
			var html = "";
			for(var i=0; i<ret.areas.length; i++){
				html += '<option value="'+ret.areas[i].area_id+'">'+ret.areas[i].area_name+'</option>';
			}
			$("select[name='data[area_id]']").html(html);		
		}else{
			$("select[name='data[area_id]']").html('<option value="">--</option>');
		}
	});
});
})(window.KT, window.jQuery);
</script>
<{include file="admin:common/footer.html"}>